﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace MvcShop.Models
{
    [MetadataType(typeof(RemarkMetadata))]
    public partial class Remark
    {
    }

    public class RemarkMetadata
    {
        [Required(ErrorMessage="用户名不能为空。")]
        [DisplayName("用户名")]
        public string UserName { get; set; }

        [Required(ErrorMessage = "内容不能为空。")]
        [DisplayName("内容")]
        public string Body { get; set; }

        [Required(ErrorMessage = "类型不能为空。")]
        [DisplayName("类型")]
        public int RemarkType { get; set; }

        [Required(ErrorMessage = "时间不能为空。")]
        public DateTime DateTime { get; set; }
    }

    public enum RemarkType
    {
        评论 = 1,
        评论的回复 = 2,
        咨询 = 3,
        咨询的回复 = 4,
    }
}
